What is wrong with this pub sub code in javascript using the dom

visit shbcf.ru